﻿@model ScmSecureCostinfoViewModel
@{
    Layout = null;
    ViewBag.Title = "安全费用管理-列表";
}
@using (Html.BeginForm("SplitPage", "ScmSecureCost", null, FormMethod.Post, new { id = "pagerForm", onsubmit = "return divSearch(this,'xtgl_aqfygl_list');" }))
{
    <input type="hidden" name="pageNum" value="1" />
    <input type="hidden" name="numPerPage" value="@(ViewBag.numPerPage)" />
    <ul class="searchBar" style="display: none">
        <li>
            <input type="hidden" name="input_section" value="@(ViewBag.Section)" />
        </li>
        <li>
            <button type="submit" class="btn btn-success btn-xs">
                搜索</button>
        </li>
    </ul>
}
<div class="panelBar" style="border-top: none;">
    <ul class="toolBar">
        @if (ViewBag.Section != null)
        {
            if (Model.TheSecureCostinfoList.Count == 0)
            {
            <li>@Html.PermissionButton("ScmSecureCost.List.Create", "listAddId", "add", Url.Action("SecureCostAdd", "ScmSecureCost", new { Section = HttpUtility.UrlEncode(ViewBag.Section,System.Text.Encoding.GetEncoding("UTF-8")) }), "", "dialog", "添加", "true", "500", "200", "添加")</li>    
            }
            
            <li>
                @Html.PermissionButton("ScmSecureCost.List.Delete", "listDelteId",
                    Url.Action("SecureCostDelete", "ScmSecureCost", new { id = "{ids}" }),
                    "删除",
                    new Dictionary<string, object>
                    {
                        {"class","delete"} ,{"target","ajaxTodo"},{"title","确定要删除该条记录吗?"},{"callback","function(){$('#pagerForm', navTab.getCurrentPanel()).submit();}"}
                    })
            </li>
            <li>@Html.PermissionButton("ScmSecureCost.List.Edit", "listEditId",
                    Url.Action("SecureCostEdit", "ScmSecureCost", new { id = "{ids}" }),
                    "修改",
                    new Dictionary<string, object>
                    {
                        {"class","edit"} ,{"mask","true"},{"target","dialog"},{"width","400"},{"height","320"},{"rel","dlg_aqsc_edit"},{"warn","请选择一条信息"}
                    })
            </li>
            <li>
                @Html.PermissionButton("ScmSecureCost.List.Detail", "rygl_jlry_detail",
                    Url.Action("SecureCostDetail", "ScmSecureCost", new { id = "{ids}" }),
                    "查看",
                    new Dictionary<string, object>
                    {
                        {"class","detail"},{"rel","rygl_jlry_detail"} ,{"warn","请选择一条信息！"},{"target","dialog"},{"mask","true"},{"width","400"},{"height","320"}
                    })
            </li>  
        }
    </ul>
</div>
<table class="table" width="100%" layouth="48" nowraptd="false" rel="xtgl_aqfygl_list">
    <thead>
        <tr>
            <th width="30" align="center">
                序号
            </th>
            <th width="300" align="center">
                标段
            </th>
            <th width="300" align="center">
                金额
            </th>
        </tr>
    </thead>
    <tbody>
        @{ int num = (ViewBag.pageNum - 1) * ViewBag.numPerPage;}
        @foreach (var item in Model.TheSecureCostinfoList)
        {
            num += 1;
            <tr target="ids" rel="@item.Sc_ID" data-testlog="true">
                <td>@num
                </td>
                <td>
                    <a title="查看" href="@Url.Action("SecureCostDetail", "ScmSecureCost", new { id = @item.Sc_ID })" mask="true" target="dialog" width="500" height="200">@item.Sc_Section</a>
                </td>
                <td>@item.Sc_Cost
                </td>
            </tr>
        }
    </tbody>
</table>
